package com.trsj.lnsj.util.ui;

import java.io.Serializable;
import java.util.List;
import com.alibaba.fastjson.JSONObject;

public class UiResult implements Serializable {

  /**
   * 
   */
  private static final long serialVersionUID = 4569843536047263561L;

  private int status;
  private String msg;
  private List recordset;
  private Object data;

  public UiResult() {}

  public UiResult(int status, String msg, List recordset, Object data) {
    this.status = status;
    this.msg = msg;
    this.recordset = recordset;
    this.data = data;
  }

  public UiResult(int status) {
    this.status = status;
  }

  public UiResult(int status, String msg) {
    this.status = status;
    this.msg = msg;
  }

  public UiResult(int status, String msg, List recordset) {
    this.status = status;
    this.msg = msg;
    this.recordset = recordset;
  }

  public UiResult(int status, String msg, Object data) {
    this.status = status;
    this.msg = msg;
    this.data = data;
  }

  public int getStatus() {
    return status;
  }

  public void setStatus(int status) {
    this.status = status;
  }

  public String getMsg() {
    return msg;
  }

  public void setMsg(String msg) {
    this.msg = msg;
  }

  public List getRecordset() {
    return recordset;
  }

  public void setRecordset(List recordset) {
    this.recordset = recordset;
  }

  public Object getData() {
    return data;
  }

  public void setData(Object data) {
    this.data = data;
  }

  public String toJson() {
    return JSONObject.toJSONString(this).toString();
  }

}
